package com.newtouch.avmarketing.api.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(schema = "avmarketing",name ="signature")
public class Signature implements Serializable {

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @ApiModelProperty(value = "主键",example = "1", hidden = true)
    @Column(name="id")
    private Long id;

    @ApiModelProperty(value = "投保单号")
    @Column(name="policy_code")
    private String policyCode;

    @ApiModelProperty(value = "base64地址")
    @Column(name="base_url")
    private String baseUrl;

    @ApiModelProperty(value = "页面名称")
    @Column(name="page_name")
    private String pageName;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @CreationTimestamp
    @ApiModelProperty(value = "创建时间", hidden = true)
    @Column(name="create_time", updatable = false)
    private Timestamp createTime;
}
